using System; 
using System.Collections.Generic; 
using System.Text; 
using FluentNHibernate.Mapping;
using Managistics.Model; 

namespace Managistics.Model.Mappings {
    
    
    public class DetailOrderCusMap : ClassMap<DetailOrderCus> {
        
        public DetailOrderCusMap() {
			Table("DETAIL_ORDER_CUS");
			LazyLoad();
			CompositeId().KeyProperty(x => x.Orderid, "ORDERID")
			             .KeyProperty(x => x.ItemId, "ITEM_ID");
			References(x => x.OrderCustomers).Column("ORDERID");
			References(x => x.Items).Column("ITEM_ID");
			Map(x => x.Quantity).Column("QUANTITY").Precision(53);
			Map(x => x.Discount).Column("DISCOUNT").Precision(24);
			Map(x => x.UnitPrice).Column("UNIT_PRICE").Precision(53);
			Map(x => x.StatusItemC).Column("STATUS_ITEM_C");
			Map(x => x.Vat).Column("VAT").Precision(5);
			Map(x => x.Remark).Column("Remark").Length(4000);
			Map(x => x.Number).Column("Number").Precision(10);
			Map(x => x.Department).Column("Department").Length(4000);
			Map(x => x.Id).Column("Id").Not.Nullable().Precision(18);
        }
    }
}
